<!DOCTYPE html>
<html lang="en" style="background:#fff;">
<head>
    <base href="${basePath}">
    <#include "common/top.html"/>
</head>
<body style="background:#fff;overflow: hidden">
<form class="layui-form" modelAttribute="facilitiesManagement" name="form1" id="form1" method="post">
    <div class="layui-form-item-dept">
                                                                            
                         <div class="layui-form-item">
                            <label class="layui-form-label">数据个数1：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="dataBit1" id="dataBit1" maxlength="50"
                                       placeholder="这里输入数据个数1" title="数据个数1"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据起始位1：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="startBit1" id="startBit1" maxlength="50"
                                       placeholder="这里输入数据起始位1" title="数据起始位1"/>
                            </div>
                        </div>
                                                                                                                            
                         <div class="layui-form-item">
                            <label class="layui-form-label">设备名称：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="managementName" id="managementName" maxlength="50"
                                       placeholder="这里输入设备名称" title="设备名称"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">安装位置：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="managementLocation" id="managementLocation" maxlength="50"
                                       placeholder="这里输入安装位置" title="安装位置"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据个数2：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="dataBit2" id="dataBit2" maxlength="50"
                                       placeholder="这里输入数据个数2" title="数据个数2"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">数据起始位2：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="startBit2" id="startBit2" maxlength="50"
                                       placeholder="这里输入数据起始位2" title="数据起始位2"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">功能码：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="functionCode" id="functionCode" maxlength="50"
                                       placeholder="这里输入功能码" title="功能码"/>
                            </div>
                        </div>
                                                                                                                            
                        <div class="layui-form-item">
                            <label class="layui-form-label">设备号：</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" type="text" name="managementId" id="managementId" maxlength="50"
                                       placeholder="这里输入设备号" title="设备号"/>
                            </div>
                        </div>
     </div>
</form>
</body>
<script type="text/javascript">

    layui.use(['form', 'table', 'laydate'], function () {
        var form = layui.form;
        var laydate = layui.laydate;

                                                                                                                                                                                form.render();

    });


    function submitHandler() {
        var prefix = basePath + "facilities/management";
        $.operate.post(prefix + '/addFacilitiesManagement', $("#form1").serializeArray(), function (result) {
            if (result.status == true) {
                layer.alert(result.msg, function (index) {
                    var index1 = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index1);
                    layer.close(index);
                });
            } else {
                parent.layer.alert(result.msg);
            }
        });
    }
</script>
</body>
</html>
